package com.ldk.api;

/**
 * 错误编码
 *
 * @author xiangwl
 * @date 2015-05-22
 */
public enum ErrorCode {
    /**
     * ==========================================
     * 系统模块错误代码
     * *==========================================
     */
    UNKNOWN("system", 0, "未知错误"),
    SIGN_ERROR("system", 1, "签名错误"),
    SYSTEM("system", 2, "系统错误"),
    MODULE_ERROR("system", 3, "请求的模块错误"),
    MODULE_EMPTY("system", 4, "请求的模块为空"),
    METHOD_ERROR("system", 5, "请求的方法错误"),
    METHOD_EMPTY("system", 6, "请求的方法为空"),
    METHOD_VERSION_ERROR("system", 7, "请求方法的版本不存在"),
    INVOKE_METHOD_EXCEPTION("system", 7, "调用方法错误"),
    SERIALIZE_ERROR("system", 8, "请求参数序列化错误"),
    REQUEST_PARMS_ERROR("system", 9, "请求方法的参数错误"),
    TOKEN_ERROR("system", 10, "账户已在其他地方登录"),
    HAVE_NOT_METHOD("system", 11, "请求方法不存在"),
    REGION_NOT_EXIST("system", 12, "地区不存在"),
    PHONE_EMPTY("system", 13, "手机号为空"),
    SERVICE_CODE_EMPTY("system", 14, "服务业务代码为空"),
    SERVICE_CODE_ERROR("system", 15, "服务业务代码错误"),
    PASSWORD_EMPTY("system", 16, "密码为空"),
    PASSWORD_ERROR("system", 16, "原密码错误"),
    PLATFORM_ERROR("system", 17, "平台错误"),
    PLATFORM_EMPTY("system", 18, "平台为空"),
    EMPTY_DATA("system", 19, "暂无数据"),
    OPENID_EMPTY("system", 20, "openId为空"),
    PAYMENT_NOT_EXIST("system", 21, "支付方式不存在"),
    ROUTE_MATRIX_FAILED("system", 22, "无法预估行程距离"),
    ORDER_NO_EMPTY("system", 23, "订单编号为空"),
    TRIP_NO_EMPTY("system", 24, "行程编号为空"),
    STATUS_ERROR("system", 25, "状态错误"),
    CITY_CODE_EMPTY("system", 26, "无法获取城市信息"),
    DISTRICT_CODE_EMPTY("system", 27, "无法获取区/县信息"),
    COMMONID_FORMAT_ERROR("system", 28, "推荐人ID号格式错误"),
    COMMONID_NON_EXIST("system", 29, "推荐人ID号不存在"),


    /**
     * ===============================================
     * APP模块错误编号
     * ===============================================
     */
    APP_NOT_START_PAGE("app", 1, "暂无启动页"),
    APP_NOT_NEW_VERSION("app", 2, "暂无最新版本"),
    APP_OPEN_SERVICE_EMPTY("app", 3, "暂无开通业务"),
    APP_NOT_RECHARGE_DISCOUNT("app", 4, "暂无充值折扣列表"),
    APP_FEEDBACK_FAILED("app", 5, "反馈失败"),


    /**
     * ===============================================
     * 短信模块错误编号
     * ===============================================
     */
    HAD_GET_VALID_CODE("sms", 1, "验证码已下发至您手机"),
    GET_VALID_CODE_FAILED("sms", 2, "获取验证码失败"),
    VALID_CODE_ERROR("sms", 3, "验证码错误"),
    VALIDE_CODE_EMPTY("sms", 4, "验证码为空"),
    VALIDE_CODE_TIME_OUT("sms", 5, "验证码已过期"),


    /**
     * ===============================================
     * 帮助模块
     * ===============================================
     */
    HELP_TYPE_EMPTY("help", 1, "暂无帮助分类"),
    HELP_DOC_EMPTY("help", 2, "暂无帮助"),
    HELP_DOC_CONTENT_EMPTY("help", 3, "暂无帮助内容"),

    /**
     * ===============================================
     * 用户模块错误编号
     * ===============================================
     */
    USER_NOT_EXIST("user", 1, "用户不存在"),
    USER_EXIST("user", 1, "用户已注册"),
    USER_DISABLE("user", 2, "用户被禁用"),
    LOGIN_FAILED("user", 3, "用户登陆失败"),
    USER_UPDATE_REMARK_FAILED("user", 4, "修改签名失败"),
    USER_UPDATE_NICKNAME_FAILED("user", 5, "修改昵称失败"),
    USER_UPDATE_PICTURE_FAILED("user", 6, "修改头像失败"),
    USER_BALANCE_NOT_ENOUGH("user", 7, "用户余额不足"),
    USER_UPDATE_LOCATION_FAILED("user", 8, "修改用户位置失败"),
    USER_PUSH_MESSAGE_NO_MORE("user", 9, "没有更多消息"),
    USER_TYPE_ERROR("user", 10, "用户类型错误"),
    USER_RECHARGE_MOENY_LESS_ZERO("user", 11, "用户充值金额小于0"),
    USER_CREATE_RECHARGE_ORDER_FAILED("user", 12, "创建充值订单失败"),
    USER_RECHARGE_ORDER_NO_MORE("user", 13, "没有更多记录"),
    USER_PAY_PWD_EMPTY("user", 14, "支付密码为空"),
    USER_PAY_PWD_ERROR("user", 15, "支付密码错误"),
    USER_LOG_PWD_ERROR("user", 15, "登录密码错误"),
    USER_SET_PAY_PWD_FAILED("user", 16, "设置密码失败"),

    /**
     * ===============================================
     * 司机模块错误编号
     * ===============================================
     */
    DRIVER_NOT_EXIST("driver", 1, "司机不存在"),
    DRIVER_ENABLED("driver", 1, "司机账号已禁用，请联系管理员"),
    DRIVER_CHECK_ING("driver", 1, "账号已提交在审核中，请耐心等待"),
    DRIVER_CHECK_FALURE("driver", 1, "账号审核不通过，请重新提交信息"),
    DRIVER_PHONE_OR_PWD_ERROR("driver", 2, "用户名或密码错误"),
    DRIVER_LOGIN_FAILED("driver", 3, "司机登录失败"),
    DRIVER_UPDATE_PASSWORD_FAILED("driver", 4, "修改密码失败"),
    DRIVER_HEAD_IMAGE_EMPTY("driver", 5, "司机头像图片为空"),
    DRIVER_HEAD_IMAGE_FAILED("driver", 6, "司机头像图片失败"),
    DRIVER_STATUS_NOT_ONLINE("driver", 7, "司机不在线"),
    DRIVER_NOT_MORE("driver", 8, "暂无更多司机"),
    DRIVER_WORKING("driver", 9, "正在工作中"),
    DRIVER_LOGOUT_FAILED("driver", 10, "司机下线失败"),
    DRIVER_UPDATE_LOCATION_FAILED("driver", 11, "司机更新位置失败"),
    DRIVER_BANK_CARD_EMPTY("driver", 12, "卡号为空"),
    DRIVER_BIND_BANK_CARD_FAILED("driver", 13, "邦卡失败"),
    DRIVER_APPLY_CASH_LESS_ZERO("driver", 14, "申请金额必须大于0"),
    DRIVER_BALANCE_NOT_ENOUGH("driver", 15, "余额不足"),
    DRIVER_EXIST_CASH_APPLY("driver", 16, "已有提现申请，请等待审核"),
    DRIVER_CASH_APPLY_FAILED("driver", 17, "申请提现失败"),
    DRIVER_EXIST("driver", 18, "司机已存在"),
    Vehicle_EXIST("driver", 19, "车辆已存在，请联系管理员"),
    DRIVER_REGISTER_FAILED("driver", 19, "司机注册失败"),
    DRIVER_IDCARD_IMAGE_EMPTY("driver", 20, "司机身份证图片为空"),
    DRIVER_DRIVE_CRET_IMAGE_EMPTY("driver", 21, "司机驾照图片为空"),
    DRIVER_IDCARD_IMAGE_FAILED("driver", 22, "上传司机身份证图片失败"),
    DRIVER_DRIVE_CRET_IMAGE_FAILED("driver", 23, "上传司机驾照图片失败"),
    DCOMMONID_EMPTY("driver", 24, "司机固定ID为空"),
    /**
     * ===============================================
     * 司机行程模块错误编号
     * ===============================================
     */
    TRIP_START_EMPTY("trip", 1, "出发地点为空"),
    TRIP_END_EMPTY("trip", 2, "目的地点为空"),
    TRIP_GO_TIME_EMPTY("trip", 3, "出发时间为空"),
    TRIP_ROAD_EMPTY("trip", 4, "拼车路线为空"),
    TRIP_PUBLISH_FAILED("trip", 5, "发布行程失败"),
    TRIP_NOT_MORE("trip", 6, "暂无更多行程"),
    TRIP_ROAD_LINE_EMPTY("trip", 7, "路线为空"),
    TRIP_SAME_SERVICE_EXIST("trip", 8, "已存在未结束的行程"),
    TRIP_NOT_EXIST("trip", 9, "行程不存在"),
    TRIP_STATUS_ERROR("trip", 10, "行程状态错误"),
    TRIP_NOT_CREWS("trip", 11, "行程暂无乘客"),
    TRIP_HAS_CREW_OFF_THE_CAR("trip", 12, "行程还有乘客未上车"),
    TRIP_GO_FAILED("trip", 13, "行程出发失败"),
    TRIP_COMPLETE_FAILED("trip", 14, "行程完成失败"),
    TRIP_DRIVER_REFUSE_APPLY_FAILED("trip", 15, "申请拒绝行程失败"),
    TRIP_PAY_STATUS_ERROR("trip", 16, "支付状态错误"),
    TRIP_PRICE_ERROR("trip", 16, "该城市未定价"),
    TRIP_PAYED("trip", 17, "行程已支付"),
    TRIP_PERPAY_FAILED("trip", 18, "行程预支付失败"),
    TRIP_HAS_COMMENTED("trip", 19, "行程已评价"),
    TRIP_HAS_COMPLAINT("trip", 20, "行程已投诉"),
    COMPLAINT_CONTENT_EMPTY("trip", 21, "投诉内容为空"),
    TRIP_COMMENT_FAILED("trip", 22, "行程评价失败"),
    TRIP_COMPLAINT_FAILED("trip", 23, "行程投诉失败"),
    TRIP_USER_TRIP_NOT_OWNER_DRIVER("trip", 24, "用户不是司机行程的乘客"),
    TRIP_CREW_NOT_EXIST("trip", 25, "用户行程与司机行程不匹配"),
    TRIP_HAS_CREW_NOT_PAYED("trip", 26, "有乘客还未支付"),
    TRIP_ESTIMATE_FAILED("trip", 27, "预估价格失败"),
    TRIP_READ_CONFIG_FAILED("trip", 28, "读取行程业务配置失败"),
    TRIP_SET_DEPOSIT_CALLBACK_FAILED("trip", 29, "设置支付定金参数失败"),
    TRIP_SET_FEE_CALLBACK_FAILED("trip", 30, "设置支付费用参数失败"),
    TRIP_CAR_RANK_EMPTY("trip", 31, "车等级为空"),
    TRIP_DEPOSIT_PAYED("trip", 32, "订单状态错误，待支付才可以发起支付"),
    TRIP_PAYFEE_LESS_ZERO("trip", 33, "支付金额小于0"),
    TRIP_ACCEPT_CAN_PAY("trip", 34, "接单后才能支付剩余费用"),
    TRIP_DRIVER_CANCEL_TRIP_FAILED("trip", 35, "司机取消行程失败"),
    DEPARTTIME_EMPTY("trip", 36, "预约时间为空"),
    DCOMMONID_FORMAT_ERROR("trip", 37, "司机ID号格式错误"),
    DRIVER_NOT_EXIST_AREA("trip", 38, "司机没上线或不在附近区域"),

    /**
     * ===============================================
     * 快递模块错误编号
     * ===============================================
     */
    EXPRESS_GOODS_NAME_EMPTY("express", 1, "货物名称不能为空"),
    EXPRESS_GOODS_IMAGE_EMPTY("express", 2, "货物图片不能为空"),
    EXPRESS_RECEIVER_EMPTY("express", 3, "收货人不能为空"),
    EXPRESS_RECEIVE_PHONE_EMPTY("express", 4, "收货人手机号不能为空"),
    EXPRESS_RECEIVE_ADDRESS_EMPTY("express", 5, "收货人地址不能为空"),
    EXPRESS_PUBLISH_ORDER_FAILED("express", 6, "发布订单失败"),
    EXPRESS_ORDER_COMMENT_FAILED("express", 7, "评价订单失败"),
    EXPRESS_ORDER_EMPTY("express", 8, "暂无更多订单"),
    EXPRESS_ORDER_NOT_EXIST("express", 9, "订单不存在"),


    /**
     * ===============================================
     * 失物招领模块错误编号
     * ===============================================
     */
    LOST_GOODS_NAME_EMPTY("lost", 1, "货物名称不能为空"),
    LOST_GOODS_IMAGE_EMPTY("lost", 2, "货物图片不能为空"),
    LOST_CONTACT_EMPTY("lost", 3, "联系方式不能为空"),
    LOST_PUBLISH_ORDER_FAILED("lost", 4, "发布订单失败"),
    LOST_ORDER_EMPTY("lost", 5, "暂无更多订单"),
    LOST_ORDER_NOT_EXIST("lost", 6, "订单不存在"),


    /**
     * ===============================================
     * 分销系统
     * ===============================================
     */
    TICKET_USER_NULL("ticket", 1, "分销用户不存在"),
    TICKET_PHONE_EXIST("ticket", 2, "该手机号已是分销经理"),
    TICKET_SALENO_EXIST("ticket", 3, "推荐码不存在,请输入正常的推荐码"),
    /**
     * ===============================================
     * 专线快车模块错误编号
     * ===============================================
     */
    ZXKC_CAR_RANK_EMPTY("zxpc", 1, "车等级为空"),
    ZXKC_CAR_SEATS_EMPTY("zxpc", 2, "车座位数为空"),
    ZXKC_START_EMPTY("zxpc", 3, "出发地点为空"),
    ZXKC_END_EMPTY("zxpc", 4, "目的地点为空"),
    ZXKC_GO_TIME_EMPTY("zxpc", 5, "出发时间为空"),
    ZXKC_ROAD_EMPTY("zxpc", 6, "拼车路线为空"),
    ZXKC_PUBLISH_ORDER_FAILED("zxpc", 7, "发布专线拼车失败"),
    ZXKC_TRIP_NOT_EXIST("zxpc", 8, "专线拼车行程不存在"),
    ZXKC_TRIP_PAY_STATUS_ERROR("zxpc", 9, "支付状态错误"),
    ZXKC_TRIP_PAYED("zxpc", 10, "行程已支付"),
    ZXKC_TRIP_PERPAY_FAILED("zxpc", 11, "行程预支付失败"),
    ZXKC_STATUS_ERROR("zxpc", 12, "行程状态错误"),
    ZXKC_USER_CANCEL_TRIP_FAILED("zxpc", 13, "用户取消行程失败"),
    ZXKC_USER_TRIP_COMMENTED("zxpc", 14, "行程已评价"),
    ZXKC_COMMENT_TRIP_FAILED("zxpc", 15, "评价失败"),
    ZXKC_TRIP_CREWS_FULL("zxpc", 17, "乘客数已满"),
    ZXKC_DRIVER_REFUSE_APPLY_FAILED("zxpc", 18, "司机申请拒绝行程失败"),
    ZXKC_TRIP_CREW_NOT_EXIST("zxpc", 19, "司机行程无该行程"),
    ZXKC_DRIVER_ACCEPT_FAILED("zxpc", 20, "司机接单失败"),
    ZXKC_USER_ON_THE_CAR_FAILED("zxpc", 21, "确认用户上车失败"),
    ZXPC_HAS_NOT_FINISHED_TRIP("zxpc", 22, "有未结束的行程"),
    ZXPC_DRIVER_NO_PUBLISH_TRIP("zxpc", 23, "司机未发布专车行程"),

    /**
     * ===============================================
     * 包车模块错误编号
     * ===============================================
     */
    BC_START_EMPTY("bc", 1, "出发地点为空"),
    BC_END_EMPTY("bc", 2, "目的地点为空"),
    BC_GO_TIME_EMPTY("bc", 3, "出发时间为空"),
    CJT_ROAD_EMPTY1("cjt", 4, "路线未开通"),
    CJT_SCHEDUL_EMPTY("cjt", 4, "未查询到排班信息"),
    CJT_START_CODE_NULL("bc", 4, "城市编码不能为空"),
    BC_TRIP_NOT_EXIST("bc", 5, "城际通行程不存在"),
    BC_STATUS_ERROR("bc", 6, "行程状态错误"),
    BC_USER_CANCEL_TRIP_FAILED("bc", 7, "用户取消行程失败"),
    CJT_USER_CANCEL_TRIP_FAILED("bc", 7, "取消行程失败"),
    BC_USER_TRIP_COMMENTED("bc", 8, "行程已评价"),
    BC_COMMENT_TRIP_FAILED("bc", 9, "评价失败"),
    BC_DRIVER_ACCEPT_FAILED("bc", 10, "司机接单失败"),
    BC_USER_ON_THE_CAR_FAILED("bc", 11, "确认用户上车失败"),
    BC_TRIP_CREW_NOT_EXIST("bc", 12, "行程无乘客"),
    BC_PUBLISH_TRIP_FAILED("bc", 13, "发布行程失败"),
    BC_HAS_NOT_FINISHED_TRIP("bc", 14, "有未结束的行程"),
    CJT_HAS_NOT_FINISHED_TRIP("bc", 14, "您有未支付的行程，请您尽快支付"),
    BC_OVER_MAX_CANCEL_TIMES("bc", 15, "超出每天最大取消次数"),
    CJT_DRIVER_CANCEL_FAILE("cjt", 5, "该行程已有乘客下单，禁止取消"),
    CJT_DRIVER_TRIP_NULL("cjt", 5, "司机行程不存在"),
    /**
     * ===============================================
     * 快车模块错误编号
     * ===============================================
     */
    KC_START_EMPTY("kc", 1, "出发地点为空"),
    KC_END_EMPTY("kc", 2, "目的地点为空"),
    KC_GO_TIME_EMPTY("kc", 3, "出发时间为空"),
    KC_PUBLISH_TRIP_FAILED("kc", 4, "发布快车失败"),
    KC_USER_CANCEL_TRIP_FAILED("kc", 5, "用户取消行程失败"),
    KC_DRIVER_ACCEPT_FAILED("kc", 6, "司机接单失败"),
    KC_HAS_NOT_FINISHED_TRIP("kc", 7, "有未结束的行程"),
    KC_HAS_NOT_PROVINCE("kc", 8, "无法获取省份信息"),
    KC_HAS_NOT_CITY("kc", 9, "无法获取城市信息"),

    /**
     * ===============================================
     * 顺风车模块错误编号
     * ===============================================
     */
    SFC_HAS_NOT_FINISHED_TRIP("sfc", 1, "有未结束的行程"),
    SFC_START_EMPTY("sfc", 2, "出发地点为空"),
    SFC_END_EMPTY("sfc", 3, "目的地点为空"),
    SFC_GO_TIME_EMPTY("sfc", 4, "出发时间为空"),
    SFC_PUBLISH_ORDER_FAILED("sfc", 5, "发布顺风车失败"),
    SFC_USER_CANCEL_TRIP_FAILED("sfc", 6, "用户取消行程失败"),
    SFC_TRIP_CREWS_FULL("sfc", 7, "乘客数已满"),
    SFC_DRIVER_ACCEPT_FAILED("sfc", 8, "司机接单失败"),

    /**
     * ===============================================
     * 现金券/优惠券模块错误编号
     * ===============================================
     */
    COUPONID_NON_EXIST("coupon", 1, "现金券ID号不存在"),
    COUPONID_NON_EXIST2("coupon", 2, "优惠券券ID号不存在"),
    COUPONID_NON_EXIST3("coupon", 3, "现金券不存在"),
    COUPONID_NON_EXIST4("coupon", 4, "优惠券券不存在"),
    ;


    private ErrorCode(String type, int code, String message) {
        this.type = type;
        this.code = code;
        this.message = message;
    }

    private String type;
    private int code;
    private String message;

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

    /**
     * @return the code
     */
    public int getCode() {
        return code;
    }

    /**
     * @param code the code to set
     */
    public void setCode(int code) {
        this.code = code;
    }

    /**
     * @return the message
     */
    public String getMessage() {
        return message;
    }

    /**
     * @param message the message to set
     */
    public void setMessage(String message) {
        this.message = message;
    }
}
